<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>login</title>
</head>
<body>
    <h1>login</h1>
    <form th:action="@{/login}" method="post">

        <p th:text="${msg}" style="color: red" th:if="${ not #strings.isEmpty(msg)}"></p>
        姓名：<input type="text" name="username" value="admin"><br>
        密码：<input type="password" name="password" value="123"><br>
        <input type="submit" value="登录">
    </form>
</body>
</html>